package gdut.stream.quote;

public class DogTest {
    public static void main(String[] args) {
        Dog dog = new Dog("hotDog");
        String dogName = DogUtils.getDog(dog, new DogInterface<Dog, String>() {
            @Override
            public String aDog(Dog dog) {
                return dog.getName();
            }
        });
        System.out.println(dogName);
        String dogName1 = DogUtils.getDog(dog, dog1 -> dog1.getName());
        System.out.println(dogName1);
        String dogName2 = DogUtils.getDog(dog, Dog::getName);
        System.out.println(dogName2);
    }
}
